<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />

<!DOCTYPE html>
<html lang="zh_CN"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="description" content="">
	<meta name="keywords" content="">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<meta name="renderer" content="webkit">
  	<link rel="stylesheet" href="${ctx}/static/images/appPDKHJ.css">
	<title>注册成功</title>
</head>
<body class="success">
	<div class="page-wrap">
		<div class="info"></div>	
		<div class="download">
			<h3 class="entry-hd">欢迎来到“闲欢游戏”</h3>
			<p class="entry-con">${errorDescribe }</p>
	
			<div class="download-btn">
				<a class="apple-btn" id="A_weixin">
					<img onclick="isWinxinTip(2);" src="${ctx}/static/images/ios-btn.png" alt="苹果版下载"></a>
				<a class="android-btn" id="J_weixin">
					<img onclick="isWinxinTip(1);" src="${ctx}/static/images/android-btn.png" alt="安卓版下载"></a>			
			</div>
		</div>
		<p class="entry-con"><a href="" style="text-decoration:none;">
			<span style="color:#C43C3C;font-size:18px;text-decoration:none;"></span></a>
		</p>
		<div class="app">
			<img src="${ctx}/static/images/timg1.jpg" alt="">
		</div>
		
		<div class="footer-bg">
			<p class="entry-con">抵制不良游戏 拒绝盗版游戏 注意自我保护 谨防受骗上当<br>适度游戏益脑 严禁游戏赌博 合理安排时间 享受健康生活</p>
		</div>
		
	</div>
	
	
	<script type="text/javascript">
	//var isWeixin = is_weixin();
    var winHeight = typeof window.innerHeight != 'undefined' ? window.innerHeight : document.documentElement.clientHeight;
    function isWinxinTip(type) {
    	if(!is_weixin()){
    		if(type==1){
    			window.location.href = "http://dlxh.v80mall.com/XianHuanYX_V_100.apk";
    		}else{
    			window.location.href = "itms-services://?action=download-manifest&url=https://xhgame888.oss-cn-shenzhen.aliyuncs.com/xhgame.plist";
    		}
    		return;
    	}
        var cssText = "#weixin-tip{position: fixed; left:0; top:0; background: rgba(0,0,0,0.8); filter:alpha(opacity=80); width: 100%; height:100%; z-index: 100;} #weixin-tip p{text-align: center; margin-top: 10%; padding:0 5%;}";
        //if(isWeixin){
            loadHtml();
            loadStyleText(cssText);
            return false;
        //}
    }

    function is_weixin() {
        var ua = navigator.userAgent.toLowerCase();
        if (ua.match(/MicroMessenger/i) == "micromessenger") {
            return true;
        } else {
            return false;
        }
    }
    function loadHtml(){
        var div = document.createElement('div');
        div.id = 'weixin-tip';
        div.innerHTML = '<p><img src="${ctx }/templates/default/skins/default/h5/images/live_weixin.png" alt="微信打开"/></p>';
        document.body.appendChild(div);
    }

    function loadStyleText(cssText) {
        var style = document.createElement('style');
        style.rel = 'stylesheet';
        style.type = 'text/css';
        try {
            style.appendChild(document.createTextNode(cssText));
        } catch (e) {
            style.styleSheet.cssText = cssText; //ie9以下
        }
        var head=document.getElementsByTagName("head")[0]; //head标签之间加上style样式
        head.appendChild(style);
    }
	
	</script>
<script src="${ctx }/templates/default/skins/default/h5/lib/jquery-2.1.4.js"></script>
<script src="${ctx }/templates/default/skins/default/h5/lib/fastclick.js"></script>
<script>
    $(function() {
        FastClick.attach(document.body);
    });
</script>
<script src="${ctx }/templates/default/skins/default/h5/js/jquery-weui.js"></script>
	
	<script src="${ctx }/templates/default/skins/default/h5/js/jquery-weui.js"></script>
</body></html>